<template>
  <main>
    <h2>这是主页面</h2>
    <p>{{ count }}</p>
    <p><button @click="addCount">点击</button></p>
    <hr />
    <HelloWorld :count="count" @update:count="count = $event"></HelloWorld>
  </main>
</template>

<script setup>
import HelloWorld from "@/components/HelloWorld.vue";

import { ref } from "vue";
let count = ref(1);
let addCount = () => {
  count.value++;
};
</script>

<style scoped></style>